package com.glw.sso.platform.domain.feign;

import com.glw.sso.platform.domain.feign.response.JuheResponse;
import com.glw.sso.platform.domain.feign.response.WeatherInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * @Author: guoliwei
 * @Date: 2021/12/17 23:29
 * @Version 1.0
 */
@FeignClient(
        name = "weatherRemoteApi",
        url = "${remote.server.juhe.url}",
        fallback = WeatherRemoteApiFallback.class
)
public interface WeatherRemoteApi {

    @GetMapping("/simpleWeather/query")
    @ResponseBody
    JuheResponse<WeatherInfo> weatherQuery(@RequestParam Map<String, Object> param);

}
